<form class="layui-form" action="{:url()}" method="post" id="editForm">

    <div class="layui-form-item">
        <label class="layui-form-label">订单信息</label>
        <div class="layui-input-block">
            <input type="checkbox" name="order[all]" title="所有" lay-filter="checked_all" lay-skin="primary">
            {foreach $order_kv as $key=>$vo }
            <input type="checkbox" name="order[{$key}]" title="{$vo}"  lay-skin="primary">
            {/foreach}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">物料信息</label>
        <div class="layui-input-block">
            <input type="checkbox" name="material[all]" lay-filter="checked_all" title="所有" lay-skin="primary">
            {foreach $material_kv as $key=>$vo }
            <input type="checkbox" name="material[{$key}]" title="{$vo}"  lay-skin="primary">
            {/foreach}
        </div>
    </div>

    <div class="pop-bottom-bar">
        <input type="hidden" name="whereData" value="{$whereData}">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" hisi-data="{pop: true, refresh: true}">提交并导出</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>


{include file="system@block/layui" /}
<script src="__PUBLIC_JS__/jquery.2.1.4.min.js?v={:config('hisiphp.version')}"></script>
<script src="__PUBLIC_JS__/xm-select/dist/xm-select.js?v={:config('hisiphp.version')}"></script>
<script src="__PUBLIC_JS__/vue@3.2.26/dist/vue.global.js"></script>
<script type="text/javascript">
    layui.use([ 'element', 'layer', 'laytpl', 'tool','laydate','table','form','flow'], function() {
        var element = layui.element;
        var layer = layui.layer;
        var $ = layui.jquery;
        var form = layui.form;
        var laytpl = layui.laytpl,laydate=layui.laydate ,table = layui.table;
        var flow = layui.flow;

        form.on('checkbox(checked_all)', function (data) {
            var a = data.elem.checked;
            if (a == true) {
                $(this).parent().find('input').prop("checked", true);
                form.render('checkbox');
            } else {
                $(this).parent().find('input').prop("checked", false);
                form.render('checkbox');
            }
            form.render('checkbox');
        });
    });

</script>